package com.homedo.odin.solution.dao;

import com.homedo.core.common.base.dao.BaseDao;
import com.homedo.odin.solution.model.entity.SolutionSku;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;

/**
 * <p> 方案关联sku关系表 Mapper 接口 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
public interface SolutionSkuMapper extends BaseDao<SolutionSku> {

    List<Map<String, Object>> querySolutionSkuCountMap(List<Long> solutionIdList);

    List<Map<String, Object>> querySolutionShelveSkuCountMap(List<Long> solutionIdList);

    List<SolutionSku> listSolutionSku(@Param("solutionId") Long solutionId, @Param("isDel") Integer isDel);

    Integer updateIsDel(@Param("solutionId") Long solutionId, @Param("skuIds") List<String> skuIds,
            @Param("isDel") Integer isDel, @Param("operator") String operator);

    List<SolutionSku> listSolutionSkuForPc(@Param("solutionId") Long solutionId, @Param("isDel") Integer isDel);

    List<SolutionSku> querySolutionSkuByUserId(@Param("userId") Integer userId);

    List<SolutionSku> findBySolutionIdsAndNotDel(@Param("solutionIds") List<Long> solutionIds,
            @Param("isDel") Integer isDel);
}